package llama;

import javax.swing.SwingUtilities;
import javax.swing.UIManager;

import llama.config.IConfigurator;
import llama.config.PropertyConfigurator;
import llama.core.ChatModel;
import llama.core.ChatModelLocator;
import llama.network.IServerConnection;
import llama.network.KryoServerConnection;
import llama.view.GUIBuilder;
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			@Override
			public void run() {
				try {
					UIManager.setLookAndFeel(
				    UIManager.getSystemLookAndFeelClassName());
				} catch (Exception e) { }
				
				IServerConnection serverConn = new KryoServerConnection();
				IConfigurator configurator = new PropertyConfigurator();
				ChatModelLocator.setChatModel(new ChatModel(serverConn, configurator));
				
				GUIBuilder guiBuilder = new GUIBuilder();
				guiBuilder.setupDefault();
			}
		});
		
	}
}
